﻿/*
-------------------------------------
    Rodeo Game Engine

    Rodeo Core Module
    ObjectManager.h - header file

    Copyright(c) Marcin Goryca
-------------------------------------
*/
#ifndef RODEO_CORE_OBJECTMANAGER_H_
#define RODEO_CORE_OBJECTMANAGER_H_

#include <vector>

#ifndef RODEO_CORE_SINGLETON_H_
#include "core\singleton.h"
#endif

#ifndef RODEO_ENTITY_MODEL3D_H_
#include "entity\model3d.h"
#endif

#ifndef RODEO_PRIMITVE_BOUNDINGVOLUME_H_
#include "primitive\boundingvolume.h"
#endif

namespace rodeocore
{
class ObjectManager : public Singleton<ObjectManager>
{
public:
    ObjectManager();

    virtual ~ObjectManager(){}

    //rodeoscene::Model3D* object3d_;
    //rodeoscene::Model3D* objects_container_[MAX_OBJECTS_];
    //rodeogeometry::BoundingVolume* bounding_volume_[MAX_OBJECTS_];

    void create(rodeoentity::Model3D* object3d);

    void add(rodeoentity::Model3D* object3d);

    void remove(rodeoentity::Model3D* object3d);

    void remove();

    rodeoentity::Model3D* getObject(ui id)const;

private:

    // Copy constructor
    ObjectManager(const ObjectManager& copy);

    // Copy operator
    ObjectManager operator=(const ObjectManager& copy);

//==== MEMBERS ====//
    // Used to counting objects
    static ui s_objects_counter_;

    // Container for Model3D objects
    std::vector<rodeoentity::Model3D*> objects_;
};
}    //end of rodeocore namespace

#endif //RODEO_CORE_OBJECTMANAGER_H_